Repository navigation
feat(components): let applications set tree arrows, bar geometry and tooltip surface - #10
Merged
Merged
Conversation
…tooltip surface Three surfaces that Viva painted with fixed geometry now take an application's own values, each falling back to Viva's when unset: - components.TreeDisclosure, through ui.TreeState.Disclosure: the collapsed and expanded icon, their size, and the width of the column before a branch's content. The ui keeps its row padding in step with the same slot. - components.ScrollBarStyle, through ScrollArea.Bars: track width, hover overlay width, the inset from the track's edge and the least thumb length. ScrollAreaGeometry records the inset, so a drag on a thumb maps back with the value the area drew with. - gfx.TooltipStyle, through Theme.Tooltip: radius, padding, text size, background, text and border. The arrow paints with the same radius and fill, and a border is a ring behind the body so the corners stay the body's. Tests cover each option and its default, and the init guide lists the Tooltip field. Co-Authored-By: AtomCode (deepseek-v4.1-flash) <noreply@atomgit.com>
1lck
marked this pull request as ready for review
November 12, 2026 05:04
1lck
added a commit
to 1lck/Lithe-IDEA
that referenced
this pull request
Nov 12, 2026
viva 侧新增三项共享控件参数(Lithe-IDEA/Lithe-viva#10 与把 6 个 fork 补丁带回主线的 #11 已合并),本次把应用侧接上,并把 viva 固定提交提到新主线 b6d2059: - 文件树改用 IDEA 自己的展开箭头(fileicons.TreeChevron 的 16pt 填充路径),行内槽宽 保持 24pt,只有箭头图形变化。 - 悬停提示改用 IDEA 的表面:4pt 圆角、12/8 内边距、13pt 文字、明暗各自的背景/文字/ 1pt 边框。 - 终端滚动条改用与编辑器一致的 11pt 轨道 / 5pt 滑块。 - desktop/go.mod 的 replace 提到 v0.6.1-0.20261112050743-b6d2059e01b0,该提交同时带回 IDE 依赖的 6 个 fork 补丁(SetTitle、OnFocusLost、MenuAt、Markdown 图片、红绿灯居中、 MenuItems.Beside),它们此前只在 fix/list-follow-end 线上。 矩阵三条记为部分实现,并写明剩余:工作台列表/树的滚动条仍在 viva 内部 ScrollArea,ui 层尚未透出该参数。 验证:workbench 包 130.7s 通过;termview 包通过;矩阵 217 条与 i18n 生成一致性通过。 Co-Authored-By: AtomCode (deepseek-v4.1-flash) <noreply@atomgit.com>
This was referenced Nov 13, 2026
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这个 PR 做什么
Lithe 的 Viva 客户端要按 IDEA 的规格重做三处共享控件,Viva 原来把它们的几何和配色写死在组件里,应用侧无处落地。这次把三处改成“应用可以覆盖、留空用 Viva 自己的”:
components.TreeDisclosure(经ui.TreeState.Disclosure)ui的行内边距跟着同一个列宽走components.ScrollBarStyle(ScrollArea.Bars)ScrollAreaGeometry记录内边距,拖动换算用同一个值gfx.TooltipStyle(Theme.Tooltip)三项都保持默认兼容:零值字段全部回退到 Viva 现有行为,因此不影响已有应用。
测试
components/tree_disclosure_test.go:自定义列宽移动行内容、默认仍是 24pt 列components/scroll_area_bars_test.go:自定义轨道/内边距/最小滑块、默认几何不变components/tooltip_style_test.go:自定义内边距与字号改变盒子高度、默认保持cmd/viva/initfiles/AGENTS.md.txt补Tooltip字段说明(ui的指南校验要求列出每个主题字段)go test ./components/ ./ui/ ./gfx/通过。go test ./...里cmd/viva的打包/签名用例在本机会失败,报 “built for macOS 13.0 or later but min_system says 12.0”,在lithe/main上复跑同样失败,属本机 CGO 部署目标的环境问题,与本改动无关。后续
vivaui/viva提 PR。desktop/go.mod的replace提到本 PR 的合并提交,接入这三项的调用。